import { createRouter, createWebHistory } from 'vue-router'
import logn from '../components/Logn.vue'
import index from '../components/Index.vue'
import buy from '../views/Buy.vue'
import dianying from '../views/dianying.vue'
import shouye from '../views/shouye.vue'
import yingyuan from '../views/yingyuan.vue'
import yanchu from '../views/yanchu.vue'
import bangdan from '../views/bangdan.vue'
import redian from '../views/redian.vue'
import shangcheng from '../views/shangcheng.vue'
import gerenzhongxin from '../views/gerenzhongxin.vue'
import gdingdan from '../views/gdingdan.vue'
import gjibenxinxi from '../views/gjibenxinxi.vue'
const routes = [
  {
    path: '/logn',
    name: 'logn',
    component: logn
  },
  {
    path: '/',
    name: 'index',
    component: index,
    children:[
      {
        // name:"shouye",
        path:"",
        component:shouye,
      },
      {
        name:"shouye",
        path:"/shouye",
        component:shouye,
      },
      {
        name:"buy",
        path:"/buy",
        component:buy,
      },
      {
        name:"dianying",
        path:"/dianying",
        component:dianying,
      },
      {
        name:"yingyuan",
        path:"/yingyuan",
        component:yingyuan,
      },
      {
        name:"yanchu",
        path:"/yanchu",
        component:yanchu,
      },
      {
        name:"bangdan",
        path:"/bangdan",
        component:bangdan,
      },
      {
        name:"redian",
        path:"/redian",
        component:redian,
      },
      {
        name:"shangcheng",
        path:"/shangcheng",
        component:shangcheng,
      },
      {
        name:"gerenzhongxin",
        path:"/gerenzhongxin",
        component:gerenzhongxin,
        children:[
          {
            name:"gdingdan",
            path:"/gdingdan",
            component:gdingdan,
          },
          {
            name:"gdingdan",
            path:"",
            component:gdingdan,
          },
          {
            name:"gjibenxinxi",
            path:"/gjibenxinxi",
            component:gjibenxinxi,
          },
        ]
      },
    ]
  },
 

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
